<%
dim csKTVersion
dim csKTEmail

if SiteIsOffLine = true then
	Response.Redirect("/keytax/web/pages/system/offline_maintenance.htm")
end if

'-------------------------------------------------- Get user info --------------------------------------------------------

if session("KeyTaxUser") <> "" then
	
	dim dllUserInfo
	dim rsUserInfo

	set dllUserInfo = Server.CreateObject("KeyTax.clsUserDetails")
	set rsUserInfo = dllUserInfo.GetUserDetailsRS(session("KeyTaxUser"))
	
	csKTEmail	= rsUserInfo("support_email")
	
	set dllUserInfo = nothing
	set rsUserInfo = nothing
	
end if

'-------------------------------------------------------------------------------------------------------------------------

'-------------------------------------------------------------------------------------------------------------------------
public function SiteIsOffLine()
	dim functions, offlineInd, result
	set functions = Server.CreateObject("KeyTax.clsFunctions")
	
	on error resume next
	
	offlineInd = functions.GetParameterDetail("SITE_OFFLINE", "VAR")
	
	if err.number = 0 then
		if offlineInd = "Y" then
			result = true
		else
			result = false
		end if
	else
		result = false	
	end if
	
	SiteIsOffLine = result
end function
'-------------------------------------------------------------------------------------------------------------------------

csKTVersion = "KeyTax v2.2"

if csKTEmail = "" then
	csKTEmail = "info@keytax.co.za"
end if

%>